home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2000 February / Macworld (2000-02).dmg / Updaters / WhiteCap 3.2.2.sea / WhiteCap 3.2.2 / WhiteCap Source / DirectX3 SDK / inc / dsetup.h < prev    next >
Text File  |  1996-08-30  |  6KB  |  227 lines

  1. /*==========================================================================
  2.  *
  3.  *  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dsetup.h
  6.  *  Content:    DirectXSetup, error codes and flags
  7.  ***************************************************************************/
  8.  
  9. #ifndef __DSETUP_H__
  10. #define __DSETUP_H__
  11.  
  12. #ifdef _WIN32
  13. #define COM_NO_WINDOWS_H
  14. #include <objbase.h>
  15. #else
  16. #define GUID   void
  17. #define LPGUID LPVOID
  18. #define LPWSTR LPSTR
  19. #define INT    int
  20. #endif
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. //
  27. // Setup Error Codes
  28. //
  29. #define DSETUPERR_BADWINDOWSVERSION     -1
  30. #define DSETUPERR_SOURCEFILENOTFOUND    -2
  31. #define DSETUPERR_BADSOURCESIZE         -3
  32. #define DSETUPERR_BADSOURCETIME         -4
  33. #define DSETUPERR_NOCOPY                -5
  34. #define DSETUPERR_OUTOFDISKSPACE        -6
  35. #define DSETUPERR_CANTFINDINF           -7
  36. #define DSETUPERR_CANTFINDDIR           -8
  37. #define DSETUPERR_INTERNAL              -9
  38. //#define DSETUPERR_NTWITHNO3D          -10  // obsolete, see docs
  39. #define DSETUPERR_UNKNOWNOS             -11
  40. #define DSETUPERR_USERHITCANCEL         -12
  41. #define DSETUPERR_NOTPREINSTALLEDONNT   -13
  42.  
  43.  
  44. //
  45. // String Constants
  46. //
  47. #define MAX_INFLINE             (16*1024)
  48. #define MAX_DESCRIPTION         256
  49.  
  50. //
  51. // DSETUP Flags
  52. //
  53. #define DSETUP_DDRAW            0x00000001      /* install DirectDraw           */
  54. #define DSETUP_DSOUND           0x00000002      /* install DirectSound          */
  55. #define DSETUP_DPLAY            0x00000004      /* install DirectPlay           */
  56. #define DSETUP_DDRAWDRV         0x00000008      /* install DirectDraw Drivers   */
  57. #define DSETUP_DSOUNDDRV        0x00000010      /* install DirectSound Drivers  */
  58. #define DSETUP_DPLAYSP          0x00000020      /* install DirectPlay Providers */
  59. #define DSETUP_DVIDEO           0x00000040      /* install DirectVideo          */
  60.  
  61. #define DSETUP_D3D              0x00000200      /* install Direct3D                                                     */
  62. //
  63. // This flag is obsolete.
  64. // For NT, we now return either 0 for pre installed or
  65. // DSETUPERR_NOTPREINSTALLEDONNT which implies this version of DirectX
  66. // is not installed on this machine.
  67. //
  68. //#define DSETUP_REQUIRESD3D    0x00000400 | DSETUP_D3D /* install Direct3D, pop up dialog box on NT, if no D3D present         */
  69. #define DSETUP_DINPUT           0x00000800      /* install DirectInput                                                     */
  70. #define DSETUP_DIRECTXSETUP     0x00001000      /* install DirectXSetup DLL's   */
  71. #define DSETUP_PROMPTFORDRIVERS 0x10000000      /* prompt when replacing display/audio drivers  */
  72. #define DSETUP_RESTOREDRIVERS   0x20000000      /* restore display/audio drivers  */
  73.  
  74.  
  75. #define DSETUP_DIRECTX          (DSETUP_D3D | DSETUP_DDRAW | DSETUP_DSOUND | \
  76.                                  DSETUP_DPLAY | DSETUP_DINPUT | \
  77.                                  DSETUP_DDRAWDRV | DSETUP_DSOUNDDRV | \
  78.                                  DSETUP_DPLAYSP)
  79.  
  80.  
  81. //
  82. // Data Structures
  83. //
  84. #ifndef UNICODE_ONLY
  85. typedef struct _DIRECTXREGISTERAPPA {
  86.     DWORD    dwSize;
  87.     DWORD    dwFlags;
  88.     LPSTR    lpszApplicationName;
  89.     LPGUID   lpGUID;
  90.     LPSTR    lpszFilename;
  91.     LPSTR    lpszCommandLine;
  92.     LPSTR    lpszPath;
  93.     LPSTR    lpszCurrentDirectory;
  94. } DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA;
  95. #endif //!UNICODE_ONLY
  96. #ifndef ANSI_ONLY
  97. typedef struct _DIRECTXREGISTERAPPW {
  98.     DWORD    dwSize;
  99.     DWORD    dwFlags;
  100.     LPWSTR   lpszApplicationName;
  101.     LPGUID   lpGUID;
  102.     LPWSTR   lpszFilename;
  103.     LPWSTR   lpszCommandLine;
  104.     LPWSTR   lpszPath;
  105.     LPWSTR   lpszCurrentDirectory;
  106. } DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW;
  107. #endif //!ANSI_ONLY
  108. #ifdef UNICODE
  109. typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP;
  110. typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP;
  111. typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP;
  112. #else
  113. typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP;
  114. typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP;
  115. typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP;
  116. #endif // UNICODE
  117.  
  118.  
  119. //
  120. // API
  121. //
  122. #ifndef UNICODE_ONLY
  123. INT
  124. WINAPI
  125. DirectXSetupA(
  126.     HWND  hWnd,
  127.     LPSTR lpszRootPath,
  128.     DWORD dwFlags
  129.     );
  130. #endif //!UNICODE_ONLY
  131. #ifndef ANSI_ONLY
  132. INT
  133. WINAPI
  134. DirectXSetupW(
  135.     HWND   hWnd,
  136.     LPWSTR lpszRootPath,
  137.     DWORD  dwFlags
  138.     );
  139. #endif //!ANSI_ONLY
  140. #ifdef UNICODE
  141. #define DirectXSetup  DirectXSetupW
  142. #else
  143. #define DirectXSetup  DirectXSetupA
  144. #endif // !UNICODE
  145.  
  146. #ifndef UNICODE_ONLY
  147. INT
  148. WINAPI
  149. DirectXDeviceDriverSetupA(
  150.     HWND  hWnd,
  151.     LPSTR lpszDriverClass,
  152.     LPSTR lpszINFPath,
  153.     LPSTR lpszDriverPath,
  154.     DWORD dwFlags
  155.     );
  156. #endif //!UNICODE_ONLY
  157. #ifndef ANSI_ONLY
  158. INT
  159. WINAPI
  160. DirectXDeviceDriverSetupW(
  161.     HWND   hWnd,
  162.     LPWSTR lpszDriverClass,
  163.     LPWSTR lpszINFPath,
  164.     LPWSTR lpszDriverPath,
  165.     DWORD  dwFlags
  166.     );
  167. #endif //!ANSI_ONLY
  168. #ifdef UNICODE
  169. #define DirectXDeviceDriverSetup  DirectXDeviceDriverSetupW
  170. #else
  171. #define DirectXDeviceDriverSetup  DirectXDeviceDriverSetupA
  172. #endif // !UNICODE
  173.  
  174. #ifndef UNICODE_ONLY
  175. INT
  176. WINAPI
  177. DirectXRegisterApplicationA(
  178.     HWND                  hWnd,
  179.     LPDIRECTXREGISTERAPPA lpDXRegApp
  180.     );
  181. #endif //!UNICODE_ONLY
  182. #ifndef ANSI_ONLY
  183. INT
  184. WINAPI
  185. DirectXRegisterApplicationW(
  186.     HWND                  hWnd,
  187.     LPDIRECTXREGISTERAPPW lpDXRegApp
  188.     );
  189. #endif //!ANSI_ONLY
  190. #ifdef UNICODE
  191. #define DirectXRegisterApplication  DirectXRegisterApplicationW
  192. #else
  193. #define DirectXRegisterApplication  DirectXRegisterApplicationA
  194. #endif // !UNICODE
  195.  
  196. INT
  197. WINAPI
  198. DirectXSetupIsJapan( void );
  199.  
  200. INT
  201. WINAPI
  202. DirectXSetupIsJapanNec( void );
  203.  
  204.  
  205. //
  206. // Function Pointers
  207. //
  208. #ifdef UNICODE
  209. typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD);
  210. typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, LPSTR, DWORD);
  211. typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPW);
  212. #else
  213. typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD);
  214. typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPSTR, LPSTR, LPSTR, DWORD);
  215. typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPA);
  216. #endif // UNICODE
  217.  
  218. typedef INT (WINAPI * LPDIRECTXSETUPISJAPAN)(VOID);
  219. typedef INT (WINAPI * LPDIRECTXSETUPISJAPANNEC)(VOID);
  220.  
  221.  
  222. #ifdef __cplusplus
  223. };
  224. #endif
  225.  
  226. #endif
  227.